package com.imooc.sell.service;

import com.imooc.sell.VO.xia.CodeVO;

import java.util.Map;

/**
 * 授权业务接口
 */
public interface AuthoService {
    /**
     * @param scope and state
     */
    CodeVO codeGetUrl(String scope, String redirectUrl, String state);

    CodeVO codeGetUrl(String scope, String state);

    Map<String, String> getToken(String code);

    Map<String, Object> getUserInfo(String openid, String access_token, String refresh_token);

    /**
     * @param openid
     * @return 如果数据库中存在此用户则返回true，否则返回false
     */
    boolean validate(String openid);

    /**
     * 访问获取code连接
     */
    void accessCode(String url);
}
